package Main;

import java.awt.Toolkit;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.plaf.metal.MetalLookAndFeel;
import views.LoginDialog;

public class Main {

    public Main() {
    }

    /**
     * Metodo principal que lanza la aplicacion.
     * @param Args
     */
    public static void main(String[] Args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException {
        Main main = new Main();

        UIManager.put("swing.boldMetal", Boolean.FALSE);
        JDialog.setDefaultLookAndFeelDecorated(true);
        JFrame.setDefaultLookAndFeelDecorated(true);
        Toolkit.getDefaultToolkit().setDynamicLayout(true);
        //System.setProperty("sun.awt.noerasebackground","true");
        try {
            UIManager.setLookAndFeel(new MetalLookAndFeel());
        } catch (UnsupportedLookAndFeelException e) {
            System.out.println("Look & Feel no soportado.");
            System.exit(0);
        }
        main.mostrarLogin();
    }

    /**
     *Metodo que inicializa la interfaz de login
     */
    public void mostrarLogin() {
        LoginDialog login = new LoginDialog();
        login.setVisible(true);
    }
}
